<extend name="Public/baseConf"/>
<block name="breadcrumb"> 
	<div class="row wrapper border-bottom white-bg page-heading">
	    <div class="col-lg-4">
	        <h2>行为列表</h2>
	        <ol class="breadcrumb">
	            <li><a href="{:U('index/index')}">首页</a></li>
	            <li class="active">
	                <strong>行为列表</strong>
	            </li>
	        </ol>
	    </div>
	    <div class="col-lg-8">
	    	<div class="title-action">
				<span class="block pull-right">
					<a class="btn btn-white" href="{:U('addaction')}">
						<i class="text-navy fa fa-pencil align-top"></i>新增
					</a>
					<button class="btn btn-white ajax-post" url="{:U('setstatus?Model=Action&status=1')}" target-form="ids">
						<i class="fa fa-flag"></i>启用
					</button>
			        <button class="btn btn-white ajax-post" url="{:U('setstatus?Model=Action&status=0')}" target-form="ids">
						<i class="fa fa-flag"></i>禁用
					</button> 
			        <button class="btn btn-white ajax-post" url="{:U('setStatus?Model=Action&status=-1')}" target-form="ids">
						<i class="text-danger fa fa-trash align-top"></i>删 除
					</button>
				</span>
            </div>
	    </div>
	</div> 
</block>

<block name="body">
	<div class="row">
            <div class="col-lg-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>行为列表</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="table-responsive">
                    <form class="ids">
		                  <table class="table table-striped table-bordered table-hover dataTables-example" >
			                  <thead>
			                  <tr>
								<th class="row-selected row-selected">
								<label><input type="checkbox" class="check-all" /><span class="lbl"></span></label></th>
								<th class="center">操作</th>
								<th class="center">编号</th>
								<th class="center">标识</th>
								<th class="center">名称</th>
								<th class="center">类型</th>
								<th class="center">规则</th>
								<th class="center">状态</th>
								<th></th>
			                  </tr>
			                  </thead>
			                  <tbody>
								<notempty name="_list">
								<volist name="_list" id="vo">
								<tr>
						            <td class="center">
										<label>
											<input type="checkbox" class="ids" name="id[]" value="{$vo.id}"/>
											<span class="lbl"></span>
										</label>
									</td>
						            <td class="center">
										<a title="{$vo.status|show_status_op}" class="blue ajax-get" href="{:U('User/setStatus?Model=action&ids='.$vo['id'].'&status='.abs(1-$vo['status']))}"><i class="fa fa-flag bigger-130"></i></a>&nbsp;&nbsp;
										<a title="编辑" class="green" href="{:U('User/editAction?id='.$vo['id'])}"><i class='fa fa-pencil bigger-130'></i></a>&nbsp;&nbsp;
						                <a title="删除" class="red ajax-get" href="{:U('User/setStatus?Model=action&status=-1&ids='.$vo['id'])}"><i class='fa fa-trash-o bigger-130'></i></a>
						            </td>
									<td class="center">{$vo.id} </td>
									<td>{$vo.name}</td>
									<td class="center"><a href="{:U('editAction?id='.$vo['id'])}">{$vo.title}</a></td>
									<td class="center"><span>{:get_action_type($vo['type'])}</span></td>
									<td>{$vo.remark}</td>
									<td class="center">{$vo.status_text}</td>
						            <td></td>
								</tr>
								</volist>
								<else/> 
								<td colspan="9" class="text-center"> aOh! 暂时还没有内容! </td>
								</notempty>
			                  </tbody>
		                  </table>
		            </form>
		            <div class="page pull-right">
				     	{$_page}
			 		</div>
                    </div>
                   
                </div>
            </div>
        </div>
    </div>
</block>
<block name="script">
<script type="text/javascript">
$(function(){
	$("#action_add").click(function(){
		window.location.href = $(this).attr('url');
	})
})
</script>
</block>
